﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using StructureMap;
using mitasoft.Web.DAL;
using mitasoft.Web.Common.Interface;
using mitasoft.Web.Common.Service;

namespace MySite2.Infrastructure
{
    public static class InitDI
    {
        public static void Register()
        {
            ObjectFactory.Initialize(x=> 
            {
                x.For<Services.IConfig>().Singleton().Use<Services.Config>();
                x.For<ILogger>().Singleton().Use<Logger>();
                
                x.For<IRepository>().Use<Repository>();
            });
        }
    }
}